<?php
    if (!file_exists(dirname(__FILE__) . '/dbDump.sql')){
        die('SQL Dump not exists! Could not load fixture data!');
    }

    //load sql
    $sql = file_get_contents(realpath(dirname(__FILE__) . '/dbDump.sql'));

    //execute sql
    $db = new mysqli('localhost', 'root', '123456', 'se_psts');

    $db->set_charset('utf8');

    $db->multi_query($sql);
    
    $db->commit();

    $db->close();

    print "<pre>";

    print "db architecture apply successful!\n";

    print "</pre>";